Skip to content

Conversation

@bryancall
Copy link
Contributor

@bryancall bryancall commented Oct 24, 2025

Fixes Fedora 41 gcc release build failure.

Add nullptr check before strcmp to satisfy GCC's -Werror=nonnull warning. The expected_strip parameter can be nullptr in some test cases (lines 325, 330, 362, 371, 376), so we need to check for null before passing to strcmp.

Error:

error: argument 2 null where non-null expected [-Werror=nonnull]
  228 |     if (strcmp(uri_strip, expected_strip) != 0) {

Affected Builds:

  • Fedora 41 gcc release

Add nullptr check before strcmp to satisfy GCC's -Werror=nonnull
warning. The expected_strip parameter can be nullptr in some test
cases, so we need to check for null before passing to strcmp.

This fixes the Fedora 41 gcc release build failure.
@bryancall bryancall added Build work related to build configuration or environment Cleanup labels Oct 24, 2025
@bryancall bryancall self-assigned this Oct 24, 2025
@bryancall bryancall added this to the 10.2.0 milestone Oct 24, 2025
When expected_strip is nullptr, the test expects that the paramName
value should be empty (i.e., no parameter was extracted from the URI).
Add a check to verify uri_strip is indeed empty in this case.
bneradt
bneradt previously approved these changes Oct 25, 2025
Copy link
Contributor

@bneradt bneradt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

JosiahWI
JosiahWI previously approved these changes Oct 27, 2025
Remove early cjose_jws_release calls that caused double-free when
validation failed. The function already releases jws unconditionally
at the end, so the early releases on the error paths resulted in
freeing the same pointer twice.

This was a pre-existing bug in the strcmp path and was replicated
in the new nullptr check path added in the previous commit.
@bryancall bryancall dismissed stale reviews from JosiahWI and bneradt via 82d2699 November 6, 2025 19:01
@bryancall bryancall requested review from JosiahWI and bneradt November 6, 2025 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build work related to build configuration or environment Cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants